import logging
from datetime import datetime
from config import settings

class VocabLogger:
    def __init__(self):
        self.logger = logging.getLogger(__name__)
        self._setup_logger()

    def _setup_logger(self):
        logging.basicConfig(
            level=logging.INFO,
            format='[%(asctime)s] ▶ %(message)s',
            datefmt='%H:%M:%S'
        )

    def log(self, message, level=logging.INFO):
        self.logger.log(level, message)

    def chapter_progress(self, current, total):
        self.log(f"处理进度: {current}/{total} 章")